package com.jml.zookeeper.二期.observer节点;

import org.I0Itec.zkclient.ZkClient;

/**
 * @author:jml
 * @date: 2019/12/11 10:15 @description：
 */
public class ObserverNode {
    private static final String ADDRES = "172.16.5.117:2181,172.16.5.118:2181,172.16.5.119:2181,172.16.5.120:2181";
    // 参数2 zk超时时间
    private static final int TIMEOUT = 5000;

    public static void main(String[] args) {
        ZkClient zkClient = new ZkClient(ADDRES, TIMEOUT);
        String path = "/data";
        zkClient.createPersistent(path);
        zkClient.close();
    }

}
